{% extends 'mould/index.html' %}

{% block title %}
  DoaminDetaile
{% endblock %}

{% block body %}
  <div class="container">
    {% if error %}
      <h1 style="text-align: center;">{{ error }}</h1>
    {% else %}
      <div class="page-header">
        <h3>域名详细信息&nbsp;
          <small style="font-size: 20px; color: #1a840f;">{{ domain_info.name }}</small>
        </h3>
      </div>
      <ul class="list-group datail-li">
        {% for key,value in domain_info.info.items %}
          <li class="list-group-item">
            <span class="datail-li-span">{{ key }}:&ensp;</span>
            {% if key == '交易类型' %}
              {% if value == '1' %}
                <span>一口价</span>
              {% elif value == '0' %}
                <span>竞价</span>
              {% else %}
                <span>待定</span>
              {% endif %}
            {% else %}
              <span>{{ value }}</span>
            {% endif %}
          </li>
        {% endfor %}
        <li class="list-group-item datail-li-span">
          <span class="datail-li-span">whios信息:&ensp;</span>
          <span>
          <a href="http://whois.stupig.com/?domain={{ domain_info.name }}" target="_blank">查看</a>
        </span>
        </li>
        <li class="list-group-item datail-li-span">
          <span class="datail-li-span">操作:&ensp;</span>
          <span>
            {% if transaction == '1' %}
              <a href="/reserve?id={{ id }}" class="btn btn-info">一口价购买</a>
            {% elif transaction == '0' %}
              <a href="/registered?id={{ id }}" class="btn btn-info">参与竞价</a>
            {% else %}
              <a class="btn btn-info" disabled="disabled">暂不出售</a>
            {% endif %}
        </span>
        </li>
      </ul>
    {% endif %}
  </div>
{% endblock %}